<?php require_once 'header2.php';?> 
<div class="main">
<script type="text/javascript" src="<?php echo base_url();?>/resources/js/ckeditor/ckeditor.js"></script>
	<div >
		<h2 onclick="showHide('forcn')" style="width:180px;cursor:pointer;" title="点击展开/隐藏">课程设置中文</h2>
		<div id="forcn" >
			<form action="<?php echo current_url(); ?>" method="POST">
			<?php if(!empty($course_cn)){
				foreach($course_cn as $k=>$v){
					echo $k+1;
					$arr = unserialize($v->content);
					?>
					<p>标题：
						<input type="text" name="course_title[]" value="<?php echo $arr[0]; ?>" />
						</br>
		 				<textarea  name="course_content[]" id="course_content_cn_<?php echo $k?>"><?php echo $arr[1];?></textarea>
						<script type="text/javascript">
					 	CKEDITOR.replace('course_content_cn_<?php echo $k?>');
						</script>
					</p> 
					<?php  
				} 
			}?>
			<p><h6>新增项</h6>
						<p>标题：
						<input type="text" name="course_title[]" value="" />
						</br>
		 				<textarea name="course_content[]" id="course_content_cn_"></textarea>
						<script type="text/javascript">
					 	CKEDITOR.replace('course_content_cn_');
						</script>
					</p>
			</p>
				 
			<p ><input type="submit" name="cn" value="更新数据库"/> <a href="#" onclick="updateCache('cn','course');">更新缓存</a></p>
			</form>
		 </div>
	</div>
	<hr/>
	<div >
		<h2 onclick="showHide('foren')" style="width:210px;cursor:pointer;" title="点击展开/隐藏">课程设置English</h2>
		<div style="display:none;" id="foren" >
			<form action="<?php echo current_url(); ?>" method="POST">
			<?php if(!empty($course_en)){
				foreach($course_en as $k=>$v){
					echo $k+1;
					$arr = unserialize($v->content);
					?>.
					<p>标题：
						<input type="text" name="course_title[]" value="<?php  echo $arr[0]; ?>" />
						</br>
		 				<textarea  name="course_content[]" id="course_content_en_<?php echo $k?>"><?php echo $arr[1]; ?></textarea>
						<script type="text/javascript">
					 	CKEDITOR.replace('course_content_en_<?php echo $k?>');
						</script>
					</p> 
					<?php  
				} 
			}?>
			<p><h6>新增项</h6>
						<p>标题：
						<input type="text" name="course_title[]" value="" />
						</br>
		 				<textarea name="course_content[]" id="course_content_en_"></textarea>
						<script type="text/javascript">
					 	CKEDITOR.replace('course_content_en_');
						</script>
					</p>
			</p>
				 
			<p ><input type="submit" name="en" value="更新数据库"/> <a href="#" onclick="updateCache('en','course');">更新缓存</a></p>
			</form>
		 </div>
	</div>
</div>
<?php require_once 'footer2.php';?> 